import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../views/login.vue'
import index from '../views/index.vue'
import register from '../views/register'
import Housing from '../views/housing.vue'
import Inquire from '../views/Inquire.vue'
import Pay from '../views/pay.vue'
import LoginAndRegister from '../views/LoginAndRegister.vue'
import HousingSystem from '../views/HousingSystem.vue'


Vue.use(VueRouter)

const newLocal = '/housing'
const routes = [
  {
    path: '/',
    name: 'index',
    component: index
  },
  {
    path: '/index',
    name: 'index',
    component: index
  },
  {
    path: '/login',
    name: 'login',
    component: login
  },
  {
    path:'/register',
    name:'register',
    component:register
  },
  {
    path:'/inquire',
    name:'Inquire',
    component:Inquire
  },
  {
    path:'/housing',
    name:'housing',
    component:Housing
  },
  {
    path:'/pay',
    name:'pay',
    component:Pay
  },
  {
    path:'/loginroot',
    name:'LoginAndRegister',
    component:LoginAndRegister
  },
  {
    path:'/HousingSystem',
    name:'HousingSystem',
    component:HousingSystem
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
